1. Field of the Invention
The present invention relates to a processing method and an apparatus for processing input pixel data by referring to pixel data of peripheral pixels.
2. Description of the Related Art
Conventionally, as a method for performing image processing on a large size image with a small capacity memory in an apparatus which lacks a page memory, a band processing method has been proposed. In this band image processing method, upon execution of two-dimensional processing for obtaining an output pixel based on peripheral pixel information, such as expansion/reduction processing or filter processing, pixel data for plural rasters is held in a register and referred to (U.S. Patent Publication No. 2005/265622).
Further, proposed is a filter calculation processing unit, having memories respectively to hold 1 pixel data installed in plural processors, which sequentially performs multiplication and addition of filter factors for pixels using movement among the processors by data shift. This type of filter calculation processing unit as disclosed in Japanese Patent Laid-Open No. 8-180177 performs filter processing without any additional memory. In the filter calculation processing unit having this configuration, a technique of introducing a method for mutual reference to a pixel hold memory in an end processor among the processors, and in liner filter processing, referring to a mirror image at an image end, has been proposed.
However, to maintain image continuity in a so-called band boundary, the boundary between a previously-processed band and a currently-processed band, a region for overlapped reference in the previous and current band regions is required. This causes excessive memory access, that is, re-read processing of such overlap region.
Further, when control is performed to avoid the re-read processing and not to refer to pixels outside a band region to be processed, as re-reading of a reference image region is not performed, it is necessary to ensure a reference region for filter processing within an input image range. As a result, a region reduced in size by outer marginal pixels referred to in filter processing or the like is outputted, and even in simple equal magnification processing, the sizes of the input image and the output image are different.
Further, even when a reference image is re-read, as an image does not exist outside upper/lower/left/right ends of an entire input image, it is necessary to internally generate a reference image and add the reference image to the read image.
Accordingly, when an image to be added is not appropriately generated in consideration of input image, the result of filter processing at the left/right end is not always desirable. For example, when processing to fixedly generate a reference image as a “white” pixel is implemented and an image to be processed is entirely a dark image, an image discontinuity occurs in a portion where a “white” image is abruptly changed to a “black” image in a boundary between a pixel region added as a reference image and a processed pixel region. Accordingly, the result of filter processing or the like is influenced by the discontinuity.
To avoid the above problem, the generation of reference image by using a pixel at an image end has been proposed.
To utilize a pixel at an image end, a reference image may be generated by stretching 1 endmost pixel. Further, as a method for reference image generation appropriate for processing using frequency components such as JPEG method, generation of a reference image by referring to a range of plural pixels at an image end in a mirroring manner has been adopted (U.S. Patent Publication No. 2005/265622 and Japanese Patent Laid-Open No. 8-180177).
However, in the above processing, at for example, an image upper end, it is necessary
to install a memory to hold 1 raster or plural raster images so as to hold at least 1 line data inside; or
to perform special data flow control for reading data in the same raster position plural times only at the upper end.
Accordingly, a large number of line memories are required, or process control is complicated.
As a novel method for avoiding such an increase in memory capacity, a data processing method (hereinbelow, referred to as a “crossband processing”) for processing in a band region while performing not line-based but column-based reading has been proposed. However, in the crossband processing, generation of pixels outside an input image with a small memory capacity has not been proposed.